[java] Upload multiple Java packages
curl --request POST \
--url https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "io.cortex.scorecards",
"version": "1.2.3"
}
]
'import requests
url = "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk"
payload = [
{
"name": "io.cortex.scorecards",
"version": "1.2.3"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{name: 'io.cortex.scorecards', version: '1.2.3'}])
};
fetch('https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'name' => 'io.cortex.scorecards',
'version' => '1.2.3'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk"
payload := strings.NewReader("[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"dateCreated": "2023-01-01T01:01:01.000Z",
"id": 0,
"name": "string",
"packageType": "JAVA",
"version": "string"
}
]{
"message": "<string>",
"type": "INTEGRATION_MISSING",
"details": "<string>",
"errorCode": "<string>",
"gatewayHttpStatus": 123,
"httpStatus": 123,
"requestId": "<string>"
}{
"status": 429,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"instance": "<string>",
"retryAfter": 1
}[java] Upload multiple Java packages
POST
/
api
/
v1
/
catalog
/
{tagOrId}
/
packages
/
java
/
bulk
[java] Upload multiple Java packages
curl --request POST \
--url https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "io.cortex.scorecards",
"version": "1.2.3"
}
]
'import requests
url = "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk"
payload = [
{
"name": "io.cortex.scorecards",
"version": "1.2.3"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{name: 'io.cortex.scorecards', version: '1.2.3'}])
};
fetch('https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'name' => 'io.cortex.scorecards',
'version' => '1.2.3'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk"
payload := strings.NewReader("[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getcortexapp.com/api/v1/catalog/{tagOrId}/packages/java/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"io.cortex.scorecards\",\n \"version\": \"1.2.3\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"dateCreated": "2023-01-01T01:01:01.000Z",
"id": 0,
"name": "string",
"packageType": "JAVA",
"version": "string"
}
]{
"message": "<string>",
"type": "INTEGRATION_MISSING",
"details": "<string>",
"errorCode": "<string>",
"gatewayHttpStatus": 123,
"httpStatus": 123,
"requestId": "<string>"
}{
"status": 429,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"instance": "<string>",
"retryAfter": 1
}Authorizations
Path Parameters
The tag (x-cortex-tag) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each / as %2F. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag /services/payments-api is referenced as %2Fservices%2Fpayments-api). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected.
Entity identifier - can be a tag or CID
Body
application/json